public class ThreadGroupDemo{
	public static void main(String[] args){
		Threadgroup group = new ThreadGroup("Group"){
			@override
			public void uncaughExpection("Thread thread,Throwable throwable){
			System.out.printf("%s:%s%n,thread.getName(),throwable.getMessage());
			}
		};

		Thread thread = new Thread(group,()->{
			throw new RuntimeExpection("测试异常");

		});
		thread.start();
	}
}

